/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package adsreis.com.Controls;

import java.sql.Date;
import java.text.SimpleDateFormat;

/**
 *
 * @author Pauroenriki
 */
public class TratarData {
    
    
    public Date TratarDataSQL(Date d){
        SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd");
            Date data = Date.valueOf(formato.format(d));
        return data;
    }
    
 
    
    
    public Date TratarDataUtil(Date d){
        SimpleDateFormat formato = new SimpleDateFormat("dd-MM-yyyy");
            Date data = Date.valueOf(formato.format(d));
        return data;
    }   
    
    public Date TratarDataUTILtoSQL(java.util.Date d){
        SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd");
            Date data = Date.valueOf(formato.format(d));
        return data;
    }
    
}
